
var express = require('express');
var router = express.Router();
var sql = require('../sql.js');
router.use('/', function(req, res) {
  /*res.send('1');*/
  var id = req.cookies.id; 
   console.log(req.cookies)
  console.log(1) 
  sql("insert ignore into personal(userid)values(?)",id, function(qerr,vals,fields){  
    //do something   
    if (qerr) throw qerr;
        if (vals) {          
            return res.json(vals)
        }
  });  
});
module.exports = router;
